int* replaceElements(int* arr, int arrSize, int* returnSize) {
	for (int i = 0; i < arrSize - 1; i++) {
		int max = -1;
		for (int j = i + 1; j < arrSize; j++) {
			if (arr[j] > max) {
				max = arr[j];
			}
		}arr[i] = max;
	}
	arr[arrSize - 1] = -1;
	*returnSize = arrSize;
	return arr;
}